@extends('common')
@section('content')
<link rel="stylesheet" href="{{url('api/shade/css/theme.css')}}" media="all">
<script type="text/javascript">
jQuery(document).ready(function($) {
	$('.theme-login').click(function(){
		$('.theme-popover-mask').fadeIn(100);
		$('.theme-popover').slideDown(200);
	})
	$('.theme-poptit .close').click(function(){
		$('.theme-popover-mask').fadeOut(100);
		$('.theme-popover').slideUp(200);
	})

})
</script>
<div >
<h3><a href="/manager/addPower">权限添加</a></h3>
 <hr />
<table class="table table-bordered table-hover" >

    <thead>
    <tr>
	    <th width=100px>权限描述</th>
        <th width=100px>URL</th>
        <th width=100px>操作</th>
    </tr>
    </thead>
	     @foreach($info as $v)
        <tr id="{{$v['p_id']}}">
		 <td >{{$v['tmp'].$v['tmp'].$v['p_desc']}}</td>
         <td >{{$v['p_url']}}</td>
         <td><a href="/manager/upPower?id={{$v['p_id']}}">修改</a> | <a href="javascript:void(0)" class='del'>删除</a></td>
         </tr>
		 @endforeach
</table>
</div>



<script type="text/javascript">
$(function(){

	//删除
   $(".del").click(function(){
   var id=$(this).parent().parent().attr('id');
   var obj=$(this)
   $.ajax({
   type: "get",
   url: "/manager/delPower",
   data: "id="+id,
   success: function(msg){
     obj.parent().parent().remove()
   }
   });
   })
   

})



</script>
@stop

